function createBitmapByName(t) {
	var e = new egret.Bitmap,
	i = RES.getRes(t);
	return e.texture = i,
	e
}
var LoadingUI = function(t) {
	function e() {
		t.call(this),
		this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
	}
	__extends(e, t);
	var i = (__define, e),
	s = i.prototype;
	return s.onAddToStage = function(t) {
		this.createView()
	},
	s.createView = function() {
		var t = this,
		e = new egret.Shape;
		e.graphics.beginFill(1114464),
		e.graphics.drawRect(0, 0, 720, 1116),
		e.graphics.endFill(),
		this.addChild(e),
		this.textField = new egret.TextField;
		var i = this;
		RES.getResByUrl("resource/assets/loading11.png",
		function(e) {
			var s = new egret.Bitmap;
			s.texture = e,
			s.anchorOffsetX = s.width / 2,
			s.anchorOffsetY = s.height,
			s.x = i.stage.stageWidth / 2,
			s.y = i.stage.stageHeight / 2 + 150,
			t.addChild(s)
		},
		this, RES.ResourceItem.TYPE_IMAGE),
		i.addChild(i.textField),
		i.textField.x = i.stage.stageWidth / 2,
		i.textField.y = i.stage.stageHeight / 2 + 220,
		i.textField.width = 480,
		i.textField.height = 100,
		i.textField.anchorOffsetX = i.textField.width / 2,
		i.textField.anchorOffsetY = i.textField.height / 2,
		i.textField.textAlign = "center"
	},
	s.setProgress = function(t, e) {
		this.textField.text = "Loading..." + parseInt("" + t / e * 100) + "%"
	},
	e
} (egret.Sprite);
egret.registerClass(LoadingUI, "LoadingUI");
var Main = function(t) {
	function e() {
		t.call(this),
		this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
	}
	__extends(e, t);
	var i = (__define, e),
	s = i.prototype;
	return s.onAddToStage = function(t) {
		this.loadingView = new LoadingUI,
		this.stage.addChild(this.loadingView),
		RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this),
		RES.loadConfig("resource/default.res.json", "resource/")
	},
	s.onConfigComplete = function(t) {
		RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this),
		RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this),
		RES.addEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this),
		RES.addEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this),
		RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR, this.onItemLoadError, this),
		RES.loadGroup("preload")
	},
	s.onResourceLoadComplete = function(t) {
		"preload" == t.groupName && (this.stage.removeChild(this.loadingView), RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this), RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this), RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this), RES.removeEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR, this.onItemLoadError, this), this.createGameScene())
	},
	s.onItemLoadError = function(t) {
		console.warn("Url:" + t.resItem.url + " has failed to load")
	},
	s.onResourceLoadError = function(t) {
		console.warn("Group:" + t.groupName + " has failed to load"),
		this.onResourceLoadComplete(t)
	},
	s.onResourceProgress = function(t) {
		"preload" == t.groupName && this.loadingView.setProgress(t.itemsLoaded, t.itemsTotal)
	},
	s.createGameScene = function() {
		var t = new Scene1;
		this.addChild(t);
		var e = new Poster;
		e.scene = t,
		this.addChild(e)
	},
	e
} (egret.DisplayObjectContainer);
egret.registerClass(Main, "Main");
var Poster = function(t) {
	function e() {
		t.call(this),
		this.scene = null,
		this.isFinished = !1,
		this.poster = null,
		this.posterAni = null,
		this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
	}
	__extends(e, t);
	var i = (__define, e),
	s = i.prototype;
	return s.onAddToStage = function(t) {
		var e = this;
		this.touchEnabled = !0,
		this.addEventListener(egret.TouchEvent.TOUCH_END, this.onTouchEnd, this);
		var i = (Util.getVisibleRegion(), this.stage.stageWidth),
		s = this.stage.stageHeight;
		this.poster = this.createBitmapByName("poster_jpg"),
		this.addChild(this.poster),
		this.posterAni = this.buildAnimationThing("poster_ani", "poster_ani", this, i / 2, s / 2, 1, 1, 0, 0, !1),
		this.posterAni.scaleX = 2.56,
		this.posterAni.scaleY = 2.56,
		this.posterAni.parent.removeChild(this.posterAni);
		var h = this.createBitmapByName("hint_shake_png");
		h.x = i / 2,
		h.y = s / 2,
		h.anchorOffsetX = h.width / 2,
		h.anchorOffsetY = h.height / 2,
		h.rotation = 0,
		h.alpha = 0;
		var a = new egret.Timer(3e3, 1);
		a.addEventListener(egret.TimerEvent.TIMER_COMPLETE,
		function() {
			egret.Tween.get(h).to({
				alpha: .9
			},
			1e3),
			egret.Tween.get(h, {
				loop: !0
			}).to({
				rotation: 15
			},
			100).to({
				rotation: -15
			},
			100, egret.Ease.sineInOut).to({
				rotation: 15
			},
			100).to({
				rotation: -15
			},
			100).to({
				rotation: 15
			},
			100).to({
				rotation: 0
			},
			100).wait(500)
		},
		this),
		a.start(),
		this.addChild(h);
		var r = 0,
		n = egret.getTimer(),
		o = 0,
		d = new egret.DeviceOrientation;
		d.addEventListener(egret.Event.CHANGE,
		function(t) {
			var i = t.gamma,
			s = i - o;
			if (Math.abs(s) > 1) {
				var h = egret.getTimer(),
				a = h - n;
				if (30 > a && a > 1) {
					var d = Math.abs(s) / a;
					d > 1 && (r++, r > 2 && e.quit())
				}
				n = h,
				o = i
			}
		},
		this),
		d.start(),
		setTimeout(function() {
			e.quit()
		},
		1e4)
	},
	s.createBitmapByName = function(t) {
		var e = new egret.Bitmap,
		i = RES.getRes(t);
		return e.texture = i,
		e
	},
	s.onTouchEnd = function(t) {
		this.quit()
	},
	s.onOrientation = function(t) {},
	s.quit = function() {
		var t = this;
		this.isFinished || (this.isFinished = !0, this.poster.parent.removeChild(this.poster), egret.Tween.get(this).to({
			alpha: 0
		},
		1e3, egret.Ease.sineIn).call(function() {
			t.parent.removeChild(t)
		}), setTimeout(function() {
			t.scene.start()
		},
		400), this.addChild(this.posterAni), this.posterAni.gotoAndPlay("start", 1))
	},
	s.buildAnimationThing = function(t, e, i, s, h, a, r, n, o, d) {
		void 0 === a && (a = 1),
		void 0 === r && (r = 1),
		void 0 === n && (n = 100),
		void 0 === o && (o = 400),
		void 0 === d && (d = !0);
		var l = RES.getRes(t + "_json"),
		c = RES.getRes(t + "_png"),
		g = new egret.MovieClipDataFactory(l, c),
		u = new egret.MovieClip(g.generateMovieClipData(e));
		return u.scaleX = a,
		u.scaleY = a,
		u.alpha = r,
		u.anchorOffsetX = u.width / 2,
		u.anchorOffsetY = u.height / 2,
		u.x = s + n * (1 - 1.5 * Math.random()),
		u.y = h + o * (1 - 1.5 * Math.random()),
		d && u.gotoAndPlay("start", -1),
		i.addChild(u),
		u
	},
	e
} (egret.DisplayObjectContainer);
egret.registerClass(Poster, "Poster");
var Scene1 = function(t) {
	function e() {
		t.call(this),
		this.sceneHeight = 6696,
		this.curDeviceOrientation = 0,
		this.lastDeviceOrientation = 0,
		this.backgroundLayerWidth = 0,
		this.distantLayerWidth = 0,
		this.distantSpriteLayerWidth = 0,
		this.rockLayerWidth = 0,
		this.nearSpriteLayerWidth = 0,
		this.frontLayerWidth = 0,
		this.targetShiftValue = 0,
		this.curShiftValue = 0,
		this.isShifting = !1,
		this.isPaused = !1,
		this.curAd = null,
		this.isAdClosable = !1,
		this.beWaitToDive = !1,
		this.lastHeroMeet = -1,
		this.heros = [],
		this.birds = new egret.DisplayObjectContainer,
		this.landingPos = {
			x: 0,
			y: 0
		},
		this.scales = {
			frontLayer: .9,
			nearSpriteLayer: .8,
			rockLayer: .7,
			distantSpriteLayer: .6,
			distantLayer: .5,
			backgroundLayer: .4
		},
		this.alphas = {
			frontLayer: 1,
			nearSpriteLayer: 1,
			rockLayer: 1,
			distantSpriteLayer: .9,
			distantLayer: .85,
			backgroundLayer: .8
		},
		this.dunkerPivotStartPosY = 850,
		this.dunkerTarget = {
			x: 0,
			y: 0
		},
		this.unexploredCoverOffset = 650,
		this.hasAllHerosBeenMeet = !1,
		this.touchRollingEnabled = !1,
		this.isTouchDown = !1,
		this.posterDownPosY = 0,
		this.touchDownY = 0,
		this.lastTouchY = 0,
		this.lastTouchTime = 0,
		this.curTouchY = 0,
		this.curTouchTime = 0,
		this.touchUpY = 0,
		this.rollingVelocity = 0,
		this.lastRollingFrameTime = 0,
		this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
	}
	__extends(e, t);
	var i = (__define, e),
	s = i.prototype;
	return s.onAddToStage = function(t) {
		this.touchEnabled = !0,
		this.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this),
		this.addEventListener(egret.TouchEvent.TOUCH_MOVE, this.onTouchMove, this),
		this.addEventListener(egret.TouchEvent.TOUCH_END, this.onTouchEnd, this),
		this.addEventListener(egret.TouchEvent.TOUCH_CANCEL, this.onTouchCancel, this),
		this.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap, this),
		this.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
		var e = new egret.DeviceOrientation;
		e.addEventListener(egret.Event.CHANGE, this.onOrientation, this),
		e.start();
		var i = new egret.Shape;
		i.graphics.beginFill(9155555),
		i.graphics.drawRect(0, 0, 720, 1116),
		i.graphics.endFill(),
		this.addChild(i),
		this.createScene()
	},
	s.start = function() {
		var t = this;
		this.sceneRoot.y = this.stageH,
		egret.Tween.get(this.sceneRoot).to({
			y: 0
		},
		2e3, egret.Ease.circOut).call(function() {
			egret.Tween.get(t.birds).to({
				alpha: 1
			},
			2e3, egret.Ease.circOut),
			t.logo_proya.alpha = 1;
			var e = t.logo_proya.x;
			t.logo_proya.x = -500,
			egret.Tween.get(t.logo_proya).to({
				x: e
			},
			2e3, egret.Ease.elasticOut),
			t.logo_didi.alpha = 1;
			var i = t.logo_didi.x;
			t.logo_didi.x = 500,
			egret.Tween.get(t.logo_didi).to({
				x: i
			},
			2e3, egret.Ease.elasticOut),
			t.logo_x.scaleX = .1,
			t.logo_x.scaleY = .1,
			egret.Tween.get(t.logo_x).to({
				alpha: 1,
				scaleX: 1,
				scaleY: 1
			},
			800),
			egret.Tween.get(t.title).wait(800).to({
				alpha: 1,
				scaleX: 1,
				scaleY: 1
			},
			1e3).call(function() {
				egret.Tween.get(t.dunkerHint).to({
					alpha: 1,
					scaleX: 1,
					scaleY: 1
				},
				600, egret.Ease.circOut)
			});
			var s = new egret.Sound,
			h = null;
			s.addEventListener(egret.Event.COMPLETE,
			function(t) {
				h = t.target.play(0, 0)
			},
			t),
			s.load("resource/assets/sound1.mp3"),
			t.dunkerBody.touchEnabled = !0,
			t.dunkerBody.addEventListener(egret.TouchEvent.TOUCH_TAP,
			function() {
				t.isStarted || (t.isStarted = !0, t.isPaused = !1, egret.Tween.get(t.dunkerHint).to({
					alpha: 0
				},
				500, egret.Ease.circOut).call(function() {
					t.dunkerHint.parent.removeChild(t.dunkerHint)
				}), t.dunkerFloatTween.pause(), t.dunkerTarget.x = t.dunkerPivot.x, t.dunkerTarget.y = t.dunkerPivot.y, setTimeout(function() {
					t.dunkerBody.gotoAndPlay("start", -1),
					t.dunkerLight.gotoAndPlay("start", -1),
					t.dunkerBody.alpha = .9,
					t.dunkerLight.alpha = .9
				},
				500), setTimeout(function() {
					setTimeout(function() {
						h.stop()
					},
					5e3);
					var e = new egret.Sound;
					e.load("resource/assets/sound2.mp3"),
					e.addEventListener(egret.Event.COMPLETE,
					function(t) {
						t.target.play(0, 0)
					},
					t)
				},
				2e3), t.targetTo(t.heros[0].meetPosX, t.heros[0].meetPosY + 50), egret.Tween.get(t.hintGyro).wait(4e3).to({
					alpha: .9
				},
				1e3).wait(4e3).to({
					alpha: 0
				},
				1e3).call(function() {
					t.hintGyro.parent.removeChild(t.hintGyro)
				}))
			},
			t)
		})
	},
	s.targetTo = function(t, e) {
		egret.Tween.get(this.dunkerTarget).to({
			x: t,
			y: e
		},
		5e3, egret.Ease.sineInOut)
	},
	s.pause = function() {
		this.isPaused = !0
	},
	s.resume = function() {
		this.isPaused = !1
	},
	s.createScene = function() {
		var t = this;
		this.stageW = this.stage.stageWidth,
		this.stageH = this.stage.stageHeight,
		this.visibleRegion = Util.getVisibleRegion(),
		this.sceneRoot = new egret.DisplayObjectContainer,
		this.addChild(this.sceneRoot),
		this.sceneRoot.x = this.stageW / 2,
		this.sceneRoot.y = this.stageH,
		this.backgroundLayer = new egret.DisplayObjectContainer,
		this.sceneRoot.addChild(this.backgroundLayer),
		this.distantLayer = new egret.DisplayObjectContainer,
		this.sceneRoot.addChild(this.distantLayer),
		this.distantSpriteLayer = new egret.DisplayObjectContainer,
		this.sceneRoot.addChild(this.distantSpriteLayer),
		this.rockLayer = new egret.DisplayObjectContainer,
		this.sceneRoot.addChild(this.rockLayer),
		this.nearSpriteLayer = new egret.DisplayObjectContainer,
		this.sceneRoot.addChild(this.nearSpriteLayer),
		this.frontLayer = new egret.DisplayObjectContainer,
		this.sceneRoot.addChild(this.frontLayer),
		this.createBackgroundLayer(),
		this.createDistantLayer(),
		this.createDistantSpriteLayer(),
		this.createRockLayer(),
		this.createNearSpriteLayer(),
		this.creatFrontLayer(),
		this.hintGyro = this.buildAnimationThing("hint_gyro", "hint_gyro", this, this.stageW / 2, this.stageH / 2 - 200, 1, 0, 0, 0),
		this.addChild(this.hintGyro),
		this.unexploredCover = createBitmapByName("unexplored_cover_png"),
		this.unexploredCover.anchorOffsetX = this.unexploredCover.width / 2,
		this.unexploredCover.anchorOffsetY = this.unexploredCover.height,
		this.unexploredCover.alpha = 1,
		this.unexploredCover.y = this.dunkerPivot.y + this.unexploredCoverOffset,
		this.sceneRoot.addChild(this.unexploredCover),
		this.hintDivePivot = new egret.DisplayObjectContainer,
		this.hintDivePivot.x = this.stageW / 2,
		this.hintDivePivot.y = this.stageH - 200,
		this.hintDive = createBitmapByName("dive_hint_png"),
		this.hintDive.anchorOffsetX = this.hintDive.width / 2,
		this.hintDive.anchorOffsetY = this.hintDive.height / 2,
		this.hintDivePivot.addChild(this.hintDive),
		egret.Tween.get(this.hintDive, {
			loop: !0
		}).to({
			y: this.hintDive.y + 30
		},
		2500, egret.Ease.sineInOut).to({
			y: this.hintDive.y
		},
		2500, egret.Ease.sineInOut),
		this.buildAnimal(),
		this.buildAnimalByFixedTime(),
		setInterval(function() {
			t.buildAnimal()
		},
		15e3)
	},
	s.shiftLayer = function(t, e, i) {
		var s = (e - this.stageW) / 2;
		t.x = s * i
	},
	s.createBackgroundLayer = function() {
		var t = 1,
		e = createBitmapByName("cloud_png");
		e.width *= t,
		e.height *= t,
		e.y = -100,
		e.anchorOffsetX = e.width / 2,
		this.backgroundLayer.addChild(e),
		this.backgroundLayer.addChild(this.birds),
		this.birds.alpha = 0;
		var i = this.buildAnimationThing("birds", "bird1", this.birds, 0, 200, 1, 1, 0, 0),
		s = function() {
			egret.Tween.get(i, {
				loop: !1
			}).to({
				scaleX: 3,
				scaleY: 3,
				x: i.x + 30,
				y: -40
			},
			2e3).call(function() {
				i.alpha = 0
			}).wait(3e3 + 5e3 * Math.random()).call(function() {
				i.x = -300 + 300 * Math.random(),
				i.y = 100 + 400 * Math.random(),
				i.scaleX = 1,
				i.scaleY = 1,
				i.alpha = 1,
				s()
			})
		};
		s();
		var h = this.buildAnimationThing("birds", "bird2", this.birds, 0, 200, 1, 1, 0, 0),
		a = function() {
			egret.Tween.get(h, {
				loop: !1
			}).to({
				scaleX: 2,
				scaleY: 2,
				x: h.x + h.y / 2,
				y: -60
			},
			2e3).call(function() {
				h.alpha = 0
			}).wait(3e3 + 5e3 * Math.random()).call(function() {
				h.x = -300 + 300 * Math.random(),
				h.y = 500 + 300 * Math.random(),
				h.scaleX = 1,
				h.scaleY = 1,
				h.alpha = 1,
				a()
			})
		};
		a();
		var r = this.buildAnimationThing("birds", "bird3", this.birds, 0, 200, 1, 1, 0, 0),
		n = function() {
			egret.Tween.get(r, {
				loop: !1
			}).to({
				scaleX: 2,
				scaleY: 2,
				x: r.x + r.y / 1.3,
				y: -50
			},
			2e3).call(function() {
				r.alpha = 0
			}).wait(3e3 + 5e3 * Math.random()).call(function() {
				r.x = -300 + 600 * Math.random(),
				r.y = 300 + 300 * Math.random(),
				r.scaleX = 1,
				r.scaleY = 1,
				r.alpha = 1,
				n()
			})
		};
		n();
		var o = this.buildAnimationThing("birds", "bird4", this.birds, 0, 200, 1, 1, 0, 0),
		d = function() {
			egret.Tween.get(o, {
				loop: !1
			}).to({
				scaleX: 1,
				scaleY: 1,
				x: o.x - o.y / 1.5,
				y: -70
			},
			1500).call(function() {
				o.alpha = 0
			}).wait(3e3 + 5e3 * Math.random()).call(function() {
				o.x = 0 + 300 * Math.random(),
				o.y = 200 + 150 * Math.random(),
				o.scaleX = .1,
				o.scaleY = .1,
				o.alpha = 1,
				d()
			})
		};
		d(),
		this.createLayerBg("ocean_", "_jpg", 6, this.backgroundLayer, t, 0, 900);
		var l = createBitmapByName("under_sea_png");
		l.y = this.sceneHeight - 900,
		l.anchorOffsetX = l.width / 2,
		l.anchorOffsetY = l.height,
		this.backgroundLayer.addChild(l);
		var c = createBitmapByName("distant_rock_png");
		c.width *= .7,
		c.height *= .7,
		c.x -= 300,
		c.y = this.sceneHeight - 1200,
		c.anchorOffsetX = c.width / 2,
		c.anchorOffsetY = c.height,
		this.backgroundLayer.addChild(c),
		this.backgroundLayerWidth = e.width
	},
	s.createDistantLayer = function() {
		var t = createBitmapByName("sea_level_back_png");
		t.y = 900,
		t.anchorOffsetX = t.width / 2,
		t.anchorOffsetY = t.height / 2,
		this.distantLayer.addChild(t);
		var e = createBitmapByName("under_sea_ship_png");
		e.y = this.sceneHeight - 1200,
		e.anchorOffsetX = e.width / 2,
		e.anchorOffsetY = e.height / 2,
		this.distantLayer.addChild(e);
		var i = createBitmapByName("under_sea_rock2_png");
		i.y = this.sceneHeight - 300,
		i.anchorOffsetX = i.width / 2,
		i.anchorOffsetY = i.height,
		this.distantLayer.addChild(i),
		this.distantLayerWidth = 1280
	},
	s.createDistantSpriteLayer = function() {
		var t = createBitmapByName("under_sea_rock_light_png");
		t.x = -80,
		t.y = this.sceneHeight - 600,
		t.alpha = .4,
		egret.Tween.get(t, {
			loop: !0
		}).to({
			alpha: 1
		},
		2e3).to({
			alpha: .4
		},
		2e3),
		t.anchorOffsetX = t.width / 2,
		t.anchorOffsetY = t.height / 2,
		this.distantSpriteLayer.addChild(t);
		var e = createBitmapByName("under_sea_rock1_png");
		e.y = this.sceneHeight,
		e.anchorOffsetX = e.width / 2,
		e.anchorOffsetY = e.height,
		this.distantSpriteLayer.addChild(e),
		this.distantSpriteLayerWidth = 1280
	},
	s.createRockLayer = function() {
		this.createLayerBg("crag_", "_png", 6, this.rockLayer),
		this.rockLayerWidth = 1280;
		var t = (this.buildAnimationThing("grass_1_2", "grass2", this.rockLayer, 280, this.sceneHeight - 4600, 1, 1, 0, 0), createBitmapByName("grass3_png"));
		t.x = 330,
		t.y = this.sceneHeight - 5290,
		t.anchorOffsetX = t.width / 2,
		t.anchorOffsetY = t.height / 2,
		this.rockLayer.addChild(t);
		var e = createBitmapByName("grass4_png");
		e.x = 420,
		e.y = this.sceneHeight - 4200,
		e.anchorOffsetX = e.width / 2,
		e.anchorOffsetY = e.height / 2,
		this.rockLayer.addChild(e);
		var i = createBitmapByName("grass5_png");
		i.x = 300,
		i.y = this.sceneHeight - 3030,
		i.anchorOffsetX = i.width / 2,
		i.anchorOffsetY = i.height / 2,
		this.rockLayer.addChild(i)
	},
	s.createNearSpriteLayer = function() {
		var t = this,
		e = createBitmapByName("front_rock_light_png");
		e.y = this.sceneHeight - 470,
		e.alpha = .4,
		egret.Tween.get(e, {
			loop: !0
		}).to({
			alpha: 1
		},
		1500).to({
			alpha: .4
		},
		1500),
		e.anchorOffsetX = e.width / 2,
		e.anchorOffsetY = e.height / 2,
		this.nearSpriteLayer.addChild(e);
		var i = createBitmapByName("front_rock_png");
		i.y = this.sceneHeight,
		i.anchorOffsetX = i.width / 2,
		i.anchorOffsetY = i.height,
		this.nearSpriteLayer.addChild(i),
		this.landingPos.x = 100,
		this.landingPos.y = i.y - 150;
		var s = .4,
		h = createBitmapByName("chest_png");
		h.touchEnabled = !0,
		h.x = -150,
		h.y = this.sceneHeight - 150,
		h.width *= s,
		h.height *= s,
		h.anchorOffsetX = h.width / 2,
		h.anchorOffsetY = h.height / 2,
		this.nearSpriteLayer.addChild(h),
		h.addEventListener(egret.TouchEvent.TOUCH_TAP,
		function() {
			window.location.href = "share.html"
		},
		this);
		var a = createBitmapByName("chest_light_png");
		a.x = h.x - 40 * s,
		a.y = h.y,
		a.width *= s,
		a.height *= s,
		a.alpha = 0,
		egret.Tween.get(a, {
			loop: !0
		}).to({
			alpha: 1
		},
		1500).to({
			alpha: 0
		},
		1e3),
		a.anchorOffsetX = a.width / 2,
		a.anchorOffsetY = a.height / 2,
		this.nearSpriteLayer.addChild(a),
		this.chestHint = createBitmapByName("hint_png"),
		this.chestHint.anchorOffsetX = this.chestHint.width / 2,
		this.chestHint.anchorOffsetY = this.chestHint.height / 2,
		this.chestHint.alpha = 0,
		this.chestHint.x = h.x + 80,
		this.chestHint.y = h.y + 80,
		this.nearSpriteLayer.addChild(this.chestHint),
		this.dunkerPivot = new egret.DisplayObjectContainer,
		this.nearSpriteLayer.addChild(this.dunkerPivot),
		this.dunkerPivot.x = -100,
		this.dunkerPivot.y = this.dunkerPivotStartPosY,
		this.dunkerBody = this.buildAnimationThing("dunkerBody", "dunkerBody", this.dunkerPivot, 0, 0, 1, 1, 0, 0, !1),
		this.dunkerLight = this.buildAnimationThing("dunkerLight", "dunkerLight", this.dunkerPivot, -90, -122, 1, 1, 0, 0, !1),
		this.dunkerLight.alpha = 0,
		this.dunkerLight.addEventListener(egret.Event.ENTER_FRAME,
		function(e) {
			2 === e.target.$currentFrameNum && 0 === t.lightStatus ? t.dunkerLight.stop() : 9 === e.target.$currentFrameNum && 1 === t.lightStatus ? t.dunkerLight.stop() : 2 === e.target.$currentFrameNum && 2 === t.lightStatus ? (t.dunkerLight.stop(), t.dunkerBody.gotoAndStop(26)) : t.dunkerLight.play( - 1)
		},
		this.dunkerLight),
		this.dunkerFloatTween = egret.Tween.get(this.dunkerBody, {
			loop: !0
		}).to({
			y: 10
		},
		1500, egret.Ease.sineInOut).to({
			y: 0
		},
		1500, egret.Ease.sineInOut),
		this.dunkerHint = createBitmapByName("hint_png"),
		this.dunkerHint.anchorOffsetX = this.dunkerHint.width / 2,
		this.dunkerHint.anchorOffsetY = this.dunkerHint.height / 2,
		this.dunkerHint.alpha = 1,
		this.dunkerHint.x = this.dunkerPivot.x + 200,
		this.dunkerHint.y = this.dunkerPivot.y + 30,
		egret.Tween.get(this.dunkerHint, {
			loop: !0
		}).to({
			y: this.dunkerHint.y + 10
		},
		500, egret.Ease.circOut).to({
			y: this.dunkerHint.y
		},
		400, egret.Ease.circOut),
		this.sceneRoot.addChild(this.dunkerHint),
		this.createLayerBg("sea_light_", "_png", 5, this.nearSpriteLayer, 1, 0, 900,
		function(t) {
			t.alpha = 0,
			egret.Tween.get(t, {
				loop: !0
			}).to({
				alpha: 1
			},
			3e3).to({
				alpha: 0
			},
			3e3)
		});
		var r = createBitmapByName("sea_level_front_png");
		r.y = 900,
		r.anchorOffsetX = r.width / 2,
		r.anchorOffsetY = r.height / 2,
		this.nearSpriteLayer.addChild(r),
		this.buildHeros(this.nearSpriteLayer),
		this.logo_x = createBitmapByName("x_png"),
		this.logo_x.x = 0,
		this.logo_x.y = 200,
		this.logo_x.anchorOffsetX = this.logo_x.width / 2,
		this.logo_x.anchorOffsetY = this.logo_x.height / 2,
		this.logo_x.alpha = 0,
		this.logo_x.scaleX = 1,
		this.logo_x.scaleY = 1,
		this.nearSpriteLayer.addChild(this.logo_x),
		this.logo_proya = createBitmapByName("logo_proya_png"),
		this.logo_proya.x = this.logo_x.x - 35,
		this.logo_proya.y = this.logo_x.y,
		this.logo_proya.anchorOffsetX = this.logo_proya.width,
		this.logo_proya.anchorOffsetY = this.logo_proya.height / 2,
		this.logo_proya.alpha = 0,
		this.logo_proya.scaleX = 1,
		this.logo_proya.scaleY = 1,
		this.nearSpriteLayer.addChild(this.logo_proya),
		this.logo_didi = createBitmapByName("logo_didi_png"),
		this.logo_didi.x = this.logo_x.x + 35,
		this.logo_didi.y = this.logo_x.y,
		this.logo_didi.anchorOffsetX = 0,
		this.logo_didi.anchorOffsetY = this.logo_didi.height / 2,
		this.logo_didi.alpha = 0,
		this.logo_didi.scaleX = 1,
		this.logo_didi.scaleY = 1,
		this.nearSpriteLayer.addChild(this.logo_didi),
		this.nearSpriteLayerWidth = 1280
	},
	s.creatFrontLayer = function() {
		var t = (this.buildAnimationThing("grass_1_2", "grass1", this.frontLayer, -330, this.sceneHeight - 110, 1, 1, 0, 0), createBitmapByName("top_sea_light_png"));
		t.y = 900,
		t.alpha = .5,
		t.anchorOffsetX = t.width / 2,
		egret.Tween.get(t, {
			loop: !0
		}).to({
			alpha: 1
		},
		6e3).to({
			alpha: .5
		},
		6e3),
		this.frontLayer.addChild(t),
		this.title = createBitmapByName("title_png"),
		this.title.y = 380,
		this.title.anchorOffsetX = this.title.width / 2,
		this.title.anchorOffsetY = this.title.height / 2,
		this.title.alpha = 0,
		this.frontLayer.addChild(this.title),
		this.frontLayerWidth = 1280
	},
	s.createLayerBg = function(t, e, i, s, h, a, r, n) {
		void 0 === h && (h = 1),
		void 0 === a && (a = 0),
		void 0 === r && (r = 0),
		void 0 === n && (n = null);
		for (var o = 0; i > o; ++o) {
			var d = createBitmapByName(t + o + e);
			d.width *= h,
			d.height *= h,
			d.anchorOffsetX = d.width / 2,
			o > 0 ? d.y = s.getChildAt(s.numChildren - 1).y + s.getChildAt(s.numChildren - 1).height: d.y = r,
			null != n && n(d),
			s.addChild(d)
		}
	},
	s.heroClicked = function(t) {
		var e = this;
		if (!this.isPaused) {
			this.heros[t].ad.alpha = 0,
			this.addChild(this.heros[t].ad),
			egret.Tween.get(this.heros[t].ad).to({
				alpha: 1
			},
			1e3, egret.Ease.circOut);
			var i = 1,
			s = 1;
			this.heros[t].ad.scaleX = .1,
			this.heros[t].ad.scaleY = .1,
			egret.Tween.get(this.heros[t].ad).to({
				alpha: 1,
				scaleX: i,
				scaleY: s
			},
			200, egret.Ease.circOut),
			this.curAd = this.heros[t].ad,
			this.isAdClosable = !1,
			setTimeout(function() {
				e.isAdClosable = !0
			},
			200),
			this.pause()
		}
	},
	s.buildHero = function(t, e, i, s, h, a, r, n, o, d, l, c) {
		var g = this;
		this.heros[t] = {},
		this.heros[t].meetPosX = l,
		this.heros[t].meetPosY = c,
		this.heros[t].isRight = s,
		this.heros[t].isMeet = !1,
		this.heros[t].pivot = new egret.DisplayObjectContainer,
		i.addChild(this.heros[t].pivot),
		this.heros[t].pivot.x = h,
		this.heros[t].pivot.y = a,
		egret.Tween.get(this.heros[t].pivot, {
			loop: !0
		}).to({
			y: this.heros[t].pivot.y + 30
		},
		2e3, egret.Ease.sineInOut).to({
			y: this.heros[t].pivot.y
		},
		2e3, egret.Ease.sineInOut),
		this.heros[t].hero = createBitmapByName("mythical_" + (t + 1) + "_1_png"),
		this.heros[t].hero.width *= e,
		this.heros[t].hero.height *= e,
		this.heros[t].hero.anchorOffsetX = this.heros[t].hero.width / 2,
		this.heros[t].hero.anchorOffsetY = this.heros[t].hero.height / 2,
		this.heros[t].hero.touchEnabled = !0,
		this.heros[t].hero.addEventListener(egret.TouchEvent.TOUCH_TAP,
		function(e) {
			g.heroClicked(t)
		},
		this, !0),
		this.heros[t].pivot.addChild(this.heros[t].hero),
		this.heros[t].word = createBitmapByName("mythical_" + (t + 1) + "_2_png"),
		this.heros[t].word.x = r,
		this.heros[t].word.y = n,
		this.heros[t].word.width *= e,
		this.heros[t].word.height *= e,
		this.heros[t].word.anchorOffsetX = this.heros[t].word.width / 2,
		this.heros[t].word.anchorOffsetY = this.heros[t].word.height / 2,
		this.heros[t].word.alpha = 0,
		this.heros[t].ad = createBitmapByName("ad_" + (t + 1) + "_png"),
		this.heros[t].ad.width *= e,
		this.heros[t].ad.height *= e,
		this.heros[t].ad.anchorOffsetX = this.heros[t].ad.width / 2,
		this.heros[t].ad.anchorOffsetY = this.heros[t].ad.height / 2,
		this.heros[t].ad.x = this.stageW / 2,
		this.heros[t].ad.y = this.stageH / 2,
		this.heros[t].ad.touchEnabled = !0,
		this.heros[t].ad.alpha = 0,
		egret.Tween.get(this.heros[t].ad, {
			loop: !0
		}).to({
			y: this.heros[t].ad.y + 30
		},
		2500, egret.Ease.sineInOut).to({
			y: this.heros[t].ad.y
		},
		2500, egret.Ease.sineInOut),
		this.heros[t].ad.addEventListener(egret.TouchEvent.TOUCH_TAP,
		function(e) {
			e.localX < 50 && e.localY < 50 && (g.heros[t].ad.parent.removeChild(g.heros[t].ad), g.resume())
		},
		this),
		this.heros[t].btn = createBitmapByName("detail_png"),
		this.heros[t].btn.x = o,
		this.heros[t].btn.y = d,
		this.heros[t].btn.width *= e,
		this.heros[t].btn.height *= e,
		this.heros[t].btn.anchorOffsetX = this.heros[t].btn.width / 2,
		this.heros[t].btn.anchorOffsetY = this.heros[t].btn.height / 2,
		this.heros[t].btn.touchEnabled = !0,
		this.heros[t].btn.alpha = 0,
		this.heros[t].btn.addEventListener(egret.TouchEvent.TOUCH_TAP,
		function(e) {
			g.heroClicked(t)
		},
		this, !0),
		0 == t && (this.heros[t].hint = createBitmapByName("hint_png"), this.heros[t].hint.x = o + 60, this.heros[t].hint.y = d + 10, this.heros[t].hint.width *= e, this.heros[t].hint.height *= e, this.heros[t].hint.anchorOffsetX = this.heros[t].hint.width / 2, this.heros[t].hint.anchorOffsetY = this.heros[t].hint.height / 2, this.heros[t].hint.alpha = 0)
	},
	s.meetHero = function(t) {
		var e = this;
		this.lastHeroMeet = t;
		var i = this.heros[t].word,
		s = this.heros[t].btn;
		if (this.heros[t].isMeet = !0, this.heros[t].pivot.addChild(i), this.heros[t].pivot.addChild(s), i.alpha = 0, s.alpha = 0, egret.Tween.get(i).to({
			alpha: 1
		},
		2e3, egret.Ease.circOut), egret.Tween.get(s).to({
			alpha: 1
		},
		2e3, egret.Ease.circOut), 0 == t) {
			var h = this.heros[t].hint;
			this.heros[t].pivot.addChild(h),
			h.alpha = 0,
			h.y = this.heros[t].btn.y + 50,
			egret.Tween.get(h).to({
				alpha: 1
			},
			2e3, egret.Ease.circOut),
			egret.Tween.get(h, {
				loop: !0
			}).to({
				y: this.heros[t].btn.y + 40
			},
			500, egret.Ease.circOut).to({
				y: this.heros[t].btn.y + 50
			},
			400, egret.Ease.circOut)
		}
		if (this.dunkerFloatTween = this.dunkerFloatTween.play(), t != this.heros.length - 1) {
			var a = new egret.Timer(3e3, 1);
			a.addEventListener(egret.TimerEvent.TIMER_COMPLETE,
			function() {
				e.dunkerFloatTween = e.dunkerFloatTween.pause(),
				e.beWaitToDive = !0,
				e.addChild(e.hintDivePivot),
				e.hintDivePivot.y = e.stageH + 200,
				egret.Tween.get(e.hintDivePivot).to({
					y: e.stageH - 200,
					alpha: 1
				},
				500, egret.Ease.circOut)
			},
			this),
			a.start()
		}
		this.heros[t].isRight ? this.lightStatus = 1 : this.lightStatus = 0
	},
	s.buildHeros = function(t) {
		var e = .6;
		this.buildHero(0, e, t, !0, 250, 1800, -200, -200, -230, -60, 0, 1850),
		this.buildHero(1, e, t, !1, -300, 3100, 150, -200, 180, -100, -250, 3120),
		this.buildHero(2, e, t, !1, 0, 4200, 0, -200, 180, -60, 200, 4250),
		this.buildHero(3, e, t, !0, 350, 5e3, -200, -180, -300, -80, -300, 5e3),
		this.buildHero(4, e, t, !0, 300, 6e3, -150, -180, -150, -70, 70, 6050)
	},
	s.buildAnimal = function() {
		this.randomBuildAnimal("fish", "fish_1", -800, 1200, {
			x: 800
		},
		2e4),
		this.randomBuildAnimal("fish", "fish_13", 900, 5800, {
			x: -900,
			y: 4200
		},
		3e4, .9, 0, 0),
		this.randomBuildAnimal("fish", "fish_13", 900, 6200, {
			x: -900,
			y: 4600
		},
		3e4, 1, 0, 0),
		this.randomBuildAnimal("fish", "fish_13", 900, 5200, {
			x: -900,
			y: 3600
		},
		3e4, .9, 0, 0),
		this.randomBuildAnimal("fish", "fish_13", 900, 4e3, {
			x: -900,
			y: 1800
		},
		3e4, 1, 0, 0),
		this.randomBuildAnimal("fish", "fish_14", -900, 6e3, {
			x: 900,
			y: 4400
		},
		3e4, 1, 0, 0),
		this.randomBuildAnimal("fish", "fish_14", -900, 4800, {
			x: 900,
			y: 2800
		},
		3e4, .9, 0),
		this.randomBuildAnimal("fish", "fish_14", -900, 4200, {
			x: 900,
			y: 2e3
		},
		3e4, 1, 0, 0),
		this.buildAnimalByTime(),
		this.buildAnimalByTime(7500)
	},
	s.buildAnimalByTime = function(t) {
		var e = this;
		void 0 === t && (t = 0),
		setTimeout(function() {
			e.randomBuildAnimal("fish", "fish_2", -1e3, 1400, {
				x: 1e3
			},
			14e3),
			e.randomBuildAnimal("fish", "fish_2", -1e3, 1900, {
				x: 1e3
			},
			14e3),
			e.randomBuildAnimal("fish", "fish_3", -1e3, 1600, {
				x: 1e3
			},
			7e3),
			e.randomBuildAnimal("fish", "fish_3", -1e3, 2200, {
				x: 1e3
			},
			7e3),
			e.randomBuildAnimal("fish", "fish_3", -900, 2540, {
				x: 900
			},
			7e3),
			e.randomBuildAnimal("fish", "fish_5", 800, 2900, {
				x: -800
			},
			8e3),
			e.randomBuildAnimal("fish", "fish_5", 900, 3100, {
				x: -900
			},
			8e3),
			e.randomBuildAnimal("fish", "fish_6", 1e3, 3400, {
				x: -1e3
			},
			7e3),
			e.randomBuildAnimal("fish", "fish_6", 1e3, 3700, {
				x: -1e3
			},
			7e3),
			e.randomBuildAnimal("fish", "fish_8", 900, 4e3, {
				x: -900
			},
			9e3, .7),
			e.randomBuildAnimal("fish", "fish_8", 900, 4200, {
				x: -900
			},
			9e3, .6),
			e.randomBuildAnimal("fish", "fish_8", 900, 6e3, {
				x: -900
			},
			9e3, .5),
			e.randomBuildAnimal("fish", "fish_9", -900, 4400, {
				x: 900
			},
			1e4, .7),
			e.randomBuildAnimal("fish", "fish_9", -900, 4600, {
				x: 900
			},
			1e4, .6),
			e.randomBuildAnimal("fish", "fish_10", -900, 5e3, {
				x: 900
			},
			8e3, .9),
			e.randomBuildAnimal("fish", "fish_10", -900, 5400, {
				x: 900
			},
			8e3, .8),
			e.randomBuildAnimal("fish", "fish_10", -900, 5800, {
				x: 900
			},
			8e3, .8),
			e.randomBuildAnimal("fish", "fish_11", 900, 5600, {
				x: -900,
				y: 4600
			},
			24e3, .9, 200, 800),
			e.randomBuildAnimal("fish", "fish_12", -900, 5900, {
				x: 900
			},
			8e3, .8),
			e.randomBuildAnimal("fish", "fish_12", -900, 6200, {
				x: 900
			},
			8e3, .9),
			e.buildAnimationThing("bubble", "bubble", e.nearSpriteLayer, -100, 5900, e.scales.nearSpriteLayer, e.alphas.nearSpriteLayer),
			e.buildAnimationThing("bubble", "bubble", e.nearSpriteLayer, 400, 5600, e.scales.nearSpriteLayer, e.alphas.nearSpriteLayer),
			e.buildAnimationThing("bubble", "bubble", e.rockLayer, -300, 5300, e.scales.rockLayer, e.alphas.rockLayer),
			e.buildAnimationThing("bubble", "bubble", e.rockLayer, 300, 5e3, e.scales.rockLayer, e.alphas.rockLayer),
			e.buildAnimationThing("bubble", "bubble", e.distantSpriteLayer, 200, 4700, e.scales.distantSpriteLayer, e.alphas.distantSpriteLayer),
			e.buildAnimationThing("bubble", "bubble", e.distantLayer, 100, 4400, e.scales.distantLayer, e.alphas.distantLayer),
			e.buildAnimationThing("bubble", "bubble", e.nearSpriteLayer, -100, 4e3, e.scales.nearSpriteLayer, e.alphas.nearSpriteLayer),
			e.buildAnimationThing("bubble", "bubble", e.nearSpriteLayer, 400, 3400, e.scales.nearSpriteLayer, e.alphas.nearSpriteLayer),
			e.buildAnimationThing("bubble", "bubble", e.rockLayer, -300, 2800, e.scales.rockLayer, e.alphas.rockLayer),
			e.buildAnimationThing("bubble", "bubble", e.rockLayer, 300, 2200, e.scales.rockLayer, e.alphas.rockLayer),
			e.buildAnimationThing("bubble", "bubble", e.nearSpriteLayer, 200, 1800, e.scales.nearSpriteLayer, e.alphas.nearSpriteLayer),
			e.buildAnimationThing("bubble", "bubble", e.distantLayer, 100, 1600, e.scales.distantLayer, e.alphas.distantLayer),
			e.buildAnimationThing("bubble", "bubble", e.rockLayer, 300, 1300, e.scales.rockLayer, e.alphas.rockLayer)
		},
		t)
	},
	s.buildAnimalByFixedTime = function() {},
	s.randomBuildAnimal = function(t, e, i, s, h, a, r, n, o, d) {
		void 0 === r && (r = 1),
		void 0 === n && (n = 100),
		void 0 === o && (o = 400),
		void 0 === d && (d = {
			loop: !1,
			yoyo: !1
		}),
		Math.random() > .5 ? this.addAnimationThing(t, e, this.nearSpriteLayer, i, s, h, a, this.scales.nearSpriteLayer * r, this.alphas.nearSpriteLayer, n, o, d) : this.addAnimationThing(t, e, this.distantSpriteLayer, i, s, h, a, this.scales.distantSpriteLayer * r, this.alphas.distantSpriteLayer, n, o, d)
	},
	s.addAnimationThing = function(t, e, i, s, h, a, r, n, o, d, l, c) {
		void 0 === r && (r = 5e3),
		void 0 === n && (n = 1),
		void 0 === o && (o = 1),
		void 0 === d && (d = 100),
		void 0 === l && (l = 400),
		void 0 === c && (c = {
			loop: !1,
			yoyo: !1
		});
		var g = this.buildAnimationThing(t, e, i, s, h, n, o, d, l);
		r *= 1.5 - Math.random();
		var u = egret.Tween.get(g, c).to(a, r).call(function() {
			c.loop || i.removeChild(g)
		});
		c.yoyo && u.to({
			x: g.x,
			y: g.y
		},
		r)
	},
	s.buildAnimationThing = function(t, e, i, s, h, a, r, n, o, d) {
		void 0 === a && (a = 1),
		void 0 === r && (r = 1),
		void 0 === n && (n = 100),
		void 0 === o && (o = 400),
		void 0 === d && (d = !0);
		var l = RES.getRes(t + "_json"),
		c = RES.getRes(t + "_png"),
		g = new egret.MovieClipDataFactory(l, c),
		u = new egret.MovieClip(g.generateMovieClipData(e));
		return u.scaleX = a,
		u.scaleY = a,
		u.alpha = r,
		u.anchorOffsetX = u.width / 2,
		u.anchorOffsetY = u.height / 2,
		u.x = s + n * (1 - 1.5 * Math.random()),
		u.y = h + o * (1 - 1.5 * Math.random()),
		d && u.gotoAndPlay("start", -1),
		i.addChild(u),
		u
	},
	s.onOrientation = function(t) {
		0 == this.lastDeviceOrientation && 0 == this.curDeviceOrientation ? (this.lastDeviceOrientation = t.gamma, this.curDeviceOrientation = t.gamma) : (this.lastDeviceOrientation = this.curDeviceOrientation, this.curDeviceOrientation = t.gamma);
		var e = this.curDeviceOrientation - this.lastDeviceOrientation;
		Math.abs(e) > .1 && (this.targetShiftValue = this.curDeviceOrientation / 40, this.targetShiftValue > 1 ? this.targetShiftValue = 1 : this.targetShiftValue < -1 && (this.targetShiftValue = -1), this.isShifting = !0)
	},
	s.checkPosterPos = function() {
		this.sceneRoot.y > 0 ? (this.sceneRoot.y = 0, this.rollingVelocity = 0) : this.sceneRoot.y < this.stage.stageHeight - this.sceneHeight && (this.sceneRoot.y = this.stage.stageHeight - this.sceneHeight, this.rollingVelocity = 0)
	},
	s.onEnterFrame = function(t) {
		var e = this;
		if (null != this.dunkerHint.parent && (this.dunkerHint.x = this.dunkerPivot.x + this.nearSpriteLayer.x + 200, this.dunkerHint.y = this.dunkerPivot.y + 30), this.isStarted && !this.isPaused) {
			var i = .07 * (this.dunkerTarget.x - this.dunkerPivot.x) * .1,
			s = .07 * (this.dunkerTarget.y - this.dunkerPivot.y);
			i > 2 ? i = 2 : -2 > i && (i = -2),
			s > 3 ? s = 3 : -3 > s && (s = -3),
			this.dunkerPivot.x += i,
			this.dunkerPivot.y += s,
			this.unexploredCover.y = this.dunkerPivot.y + this.unexploredCoverOffset;
			for (var h = -1,
			a = !0,
			r = 0; r < this.heros.length; ++r) 0 == this.heros[r].isMeet && this.dunkerPivot.y > this.heros[r].meetPosY && (this.meetHero(r), h = r),
			0 == this.heros[r].isMeet && (a = !1);
			if (!this.hasAllHerosBeenMeet && a && (this.hasAllHerosBeenMeet = !0, egret.Tween.get(this.dunkerTarget).wait(3e3).call(function() {}).to({
				x: this.landingPos.x,
				y: this.landingPos.y
			},
			7e3, egret.Ease.sineInOut).call(function() {
				e.chestHint.alpha = 0,
				e.lightStatus = 2,
				egret.Tween.get(e.chestHint).to({
					alpha: 1
				},
				5e3, egret.Ease.circOut).call(function() {}),
				egret.Tween.get(e.chestHint, {
					loop: !0
				}).to({
					y: e.chestHint.y + 10
				},
				500, egret.Ease.circOut).to({
					y: e.chestHint.y
				},
				400, egret.Ease.circOut)
			})), !this.isTouchDown) {
				var n = this.dunkerPivotStartPosY - this.dunkerPivot.y - 300;
				this.hasAllHerosBeenMeet && (n = this.stageH - this.sceneHeight + 30, this.touchRollingEnabled = !0);
				var s = .07 * (n - this.sceneRoot.y);
				s > 4 ? s = 4 : -4 > s && (s = -4),
				this.sceneRoot.y += s
			}
		}
		if (this.isShifting) {
			var o = .07 * (this.targetShiftValue - this.curShiftValue);
			o > 1 ? o = 1 : -1 > o && (o = -1),
			this.curShiftValue += o,
			Math.abs(this.curShiftValue - this.targetShiftValue) < .01 && (this.isShifting = !1),
			this.shiftLayer(this.backgroundLayer, this.backgroundLayerWidth, this.curShiftValue),
			this.shiftLayer(this.distantLayer, .9 * this.distantLayerWidth, this.curShiftValue),
			this.shiftLayer(this.distantSpriteLayer, .85 * this.distantSpriteLayerWidth, this.curShiftValue),
			this.shiftLayer(this.rockLayer, .8 * this.rockLayerWidth, this.curShiftValue),
			this.shiftLayer(this.nearSpriteLayer, .75 * this.nearSpriteLayerWidth, this.curShiftValue),
			this.shiftLayer(this.frontLayer, .7 * this.frontLayerWidth, this.curShiftValue)
		}
		if (0 != this.rollingVelocity) {
			var d = 0,
			l = egret.getTimer();
			0 == this.lastRollingFrameTime ? (d = 0, this.lastRollingFrameTime = l) : (d = l - this.lastRollingFrameTime, this.lastRollingFrameTime = l),
			this.sceneRoot.y += this.rollingVelocity * d * .8;
			var c = this.rollingVelocity + .01 * d * (this.rollingVelocity > 0 ? -1 : 1);
			this.rollingVelocity * c < 0 ? this.rollingVelocity = 0 : this.rollingVelocity = c,
			this.checkPosterPos()
		}
	},
	s.onTouchBegin = function(t) {
		this.touchRollingEnabled && !this.isPaused && (this.isTouchDown = !0, this.touchDownY = t.stageY, this.curTouchY = t.stageY, this.curTouchTime = egret.getTimer(), this.lastTouchY = this.curTouchY, this.lastTouchTime = this.curTouchTime, this.posterDownPosY = this.sceneRoot.y, this.rollingVelocity = 0, this.lastRollingFrameTime = 0)
	},
	s.onTouchMove = function(t) {
		if (this.isTouchDown && this.touchRollingEnabled && !this.isPaused) {
			this.lastTouchY = this.curTouchY,
			this.lastTouchTime = this.curTouchTime,
			this.curTouchY = t.stageY,
			this.curTouchTime = egret.getTimer();
			var e = this.curTouchY - this.touchDownY;
			this.sceneRoot.y = this.posterDownPosY + e,
			this.checkPosterPos()
		}
	},
	s.onTouchEnd = function(t) {
		if (this.isTouchDown && this.touchRollingEnabled) {
			var e = t.stageY,
			i = egret.getTimer(),
			s = i - this.lastTouchTime;
			s > 100 ? this.rollingVelocity = 0 : this.rollingVelocity = (e - this.lastTouchY) / s,
			this.isTouchDown = !1
		}
	},
	s.onTouchCancel = function(t) {
		this.onTouchEnd(t)
	},
	s.onTouchTap = function(t) {
		var e = this;
		if (null != this.curAd && this.isAdClosable) {
			var i = (this.curAd.x - t.stageX) * (this.curAd.x - t.stageX) + (this.curAd.y - t.stageY) * (this.curAd.y - t.stageY);
			Math.sqrt(i) > this.curAd.width / 2 && (this.isAdClosable = !1, egret.Tween.get(this.curAd).to({
				alpha: 0,
				scaleX: .1,
				scaleY: .1
			},
			200, egret.Ease.circIn).call(function() {
				e.curAd.parent.removeChild(e.curAd),
				e.curAd = null,
				e.resume()
			}))
		} ! this.isPaused && this.beWaitToDive && -1 != this.lastHeroMeet && this.lastHeroMeet != this.heros.length - 1 && (this.targetTo(this.heros[this.lastHeroMeet + 1].meetPosX, this.heros[this.lastHeroMeet + 1].meetPosY + 50), this.lightStatus = -1, this.beWaitToDive = !1, egret.Tween.get(this.hintDivePivot).to({
			y: this.stageH + 200,
			alpha: 0
		},
		500, egret.Ease.circIn).call(function() {}))
	},
	e
} (egret.DisplayObjectContainer);
egret.registerClass(Scene1, "Scene1");
var Util = function() {
	function t() {}
	var e = (__define, t);
	e.prototype;
	return t.getVisibleRegion = function() {
		var t = new egret.Rectangle,
		e = document.documentElement.clientWidth,
		i = document.documentElement.clientHeight,
		s = egret.MainContext.instance.stage.stageWidth,
		h = egret.MainContext.instance.stage.stageHeight;
		return s / h > e / i ? (t.width = e / i * h, t.height = h, t.x = (s - t.width) / 2, t.y = 0) : (t.width = s, t.height = i / e * s, t.x = 0, t.y = (h - t.height) / 2),
		t
	},
	t
} ();
egret.registerClass(Util, "Util");